﻿using UnityEngine;

namespace YuoTools
{
    public class BackgroundColorAttribute : PropertyAttribute
    {
        public Color color;
        public Color textColor = Color.white;

        public BackgroundColorAttribute(float r, float g, float b, float a)
        {
            color = new Color(r, g, b, a);
        }

        public BackgroundColorAttribute(string color, string textColor = "#FFFFFF")
        {
            this.color = color.Str16ToColor();
            this.textColor = textColor.Str16ToColor();
        }

        public BackgroundColorAttribute(Color color)
        {
            this.color = color;
        }
    }
}